<template>
    <div class="mui-numbox" data-numbox-min="1" :data-numbox-max="max">
        <button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
        <input id="test" class="mui-input-numbox" type="number" value="1" @change="inputChange" ref="num">
        <button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
	</div>
</template>

<script>
export default {
    data() {
        return {
            
        }
    },
    props: [
        'max'
    ],
    methods: {
        inputChange(){
            this.$emit('getcount',parseInt(this.$refs.num.value));
            console.log(parseInt(this.$refs.num.value));
        }
    }
}
</script>

<style lang="scss" scoped>

</style>
